var AccountSearchBox = {
    doSearch: function (beforeSearch, done, fail, always, onlyActiveAccount) {
        accountList.clear();
        if (beforeSearch != null) {
            beforeSearch();
        }
        $.ajax({
            url: "/api/teacher/search_account",
            method: 'GET',
            contentType: 'application/json',
            dataType: 'json'
        })
            .done(function (data) {
                if (done != null) {
                    done(data);
                }
            })
            .fail(function (jqXHR) {
                if (fail != null) {
                    fail(jqXHR);
                }
            })
            .always(function () {
                if (always != null) {
                    always();
                }
            });
    }
};